﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////


#pragma once
#include "GnufBase.h"
#include "GnufStyleSheets.h"

namespace gnuf {
    class GNUF_BASE_EXPORT StyleSheetComposer final
    {
        CANNOT_COPY_OR_ASSIGN(StyleSheetComposer)
    public:
        explicit StyleSheetComposer();
        ~StyleSheetComposer();
        
        // Return the default style sheet composer.
        static gcmp::OwnerPtr< StyleSheetComposer > makeDefaultOne();

        // Return the string of the style sheet(s).
        std::string toString() const;
        
        // Add some style sheet(s).
        StyleSheet * addStyleSheet(StyleSheet::EType, const char * objectName = nullptr);

        // Return the style sheet whose type or/and object name is the given ones.
        const StyleSheet * styleSheetBy(StyleSheet::EType, const char * objectName = nullptr) const;
        
    public:
        std::list< gcmp::OwnerPtr< StyleSheet > > m_styleSheets;
    };
}
